<meta charset="UTF-8">
<script>
    (function (){
        var url = new URL(window.location.href);
        var toPathName = url.pathname.split("/").pop();
        url.searchParams.set("toPathName",toPathName);
        window.location.href = "html.php" + url.search;
    })()
</script>